﻿Class MainWindow 

    Private Sub CommandAlwaysCanExecute(sender As Object, e As CanExecuteRoutedEventArgs)
        e.CanExecute = True
    End Sub

    Private Sub CloseCommand_Executed(sender As Object, e As ExecutedRoutedEventArgs)
        Dim vm = CType(CType(sender, FrameworkElement).DataContext, InkTypeViewModel)
        vm.OnExit()
    End Sub

    Private Sub window_Closed(sender As Object, e As EventArgs)
        ApplicationCommands.Close.Execute(Nothing, Me)
    End Sub

    Private Sub CloseMenuButton_Click(sender As Object, e As RoutedEventArgs)
        flipper.IsFlipped = False
    End Sub

    Private Sub FlipBackCommand_Executed(sender As Object, e As ExecutedRoutedEventArgs)
        flipper.IsFlipped = False
    End Sub

    Private Sub FlipCommand_Executed(sender As Object, e As ExecutedRoutedEventArgs)
        flipper.IsFlipped = True
    End Sub
End Class
